// Package _9__x_的平方根 main
// @Title _9__x_的平方根
// @Description
// @Author  == 琳琳也叫王木木 ==  2022-02-18 15:13
// @Create  2022-02-18 15:13
package main

func mySqrt(x int) int {
	l, r := 0, x/2
	ans := -1
	for l <= r {
		mid := l + (r-l)/2
		if mid*mid <= x {
			ans = mid
			l = mid + 1
		} else {
			r = mid - 1
		}
	}
	return ans
}

func main() {

}
